<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/9/24
 * Time: 9:33
 */

namespace app\common\model;


class UserBank extends Base
{

    protected $createTime = 'create_time';
    protected $updateTime = 'update_time';


    /**
     * 类型
     * @var array
     */
    public $types = [
        1 => '微信账号',
        2 => '支付宝账号',
        3 => '银行卡',
    ];

    public $editfield = [

    ];

    /**
     * 初始化
     */
    public function initialize()
    {
        parent::initialize();
        foreach ($this->editfield as $k => $v) {

        }
    }

    /**
     * 类型中文名
     * @param $key
     * @param $value
     * @return mixed|string
     */
    public function getTypeNameAttr($key, $value)
    {
        return isset($this->types[$value['type']]) ? $this->types[$value['type']] : '未知';
    }


}